package com.wqm.step.pojo;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "u_uuid")
public class Uuid {

	/**
	 * 使用uuid作为主键生成策略，这个uuid在mysql数据库中会自动生成
	 * 	比如添加数据的时候，uuid就自动生成并添加了
	 */
	@Id
	@GenericGenerator(name = "myuuid", strategy = "uuid")// uuid是hibernate提供的实现，不是javax.persistence提供(他没有)
	@GeneratedValue(generator = "myuuid")
	private String id;
	
	private String name;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}
